'use strict';


//var backOfficeHost = 't.app.66xiaoqu.com';
//var fastDfsHostIp = 'http://t.res.66xiaoqu.com';

angular.module('backofficeApp', ['ngRoute', 'ngResource', "backofficeApp.retailerExchange.controller",
    'backofficeApp.communityRewardRule.controller', 'backofficeApp.communityRewardRule.services',
    'backofficeApp.retailerBalance.controller', 'backofficeApp.retailerBalance.services',
    //'backofficeApp.questionManager.controllers', 'backofficeApp.questionManager.services',
    'backofficeApp.shortMessageManager.controllers', 'backofficeApp.shortMessageManager.services',
    'backofficeApp.customerManager.controllers', 'backofficeApp.customerManager.services',
    //'backofficeApp.topicManager.controllers', 'backofficeApp.topicManager.services',
    'backofficeApp.login.controllers',
    'backofficeApp.backendUser.controllers', 'backofficeApp.backendUser.services',
    'backofficeApp.backendServiceUser.controllers', 'backofficeApp.backendServiceUser.services',
    'backofficeApp.commissionSettlementManager.controller',
    //'backofficeApp.backendHome.controllers',
    'backofficeApp.voucherManager.controllers',
    'backofficeApp.retailerManager.controllers', 'backofficeApp.retailerCommunity.controllers',
    'backofficeApp.backendConsole.controllers',
    //'backofficeApp.scoreShopManager.controllers',
    'backofficeApp.mutualAidManager.controllers', 'backofficeApp.promotionCode.controllers',
    'backofficeApp.bannerList.controllers', 'backofficeApp.bannerAdd.controllers',
    'backofficeApp.bannerEdit.controllers', 'backofficeApp.bannerOrder.controllers',
    'backofficeApp.reportManager.controller', 'backofficeApp.replyAtCsService.controllers',
    //'backofficeApp.questionAdd.controllers','backofficeApp.postAdd.controllers',
    'backofficeApp.numberGroup.controllers', "backofficeApp.communityService.controllers",
    'backofficeApp.appErrorLog.controllers', "backofficeApp.lotteryActivity.controller",
    'backofficeApp.dosomething.controllers','backofficeApp.geekManager.controllers',
    // BI
    'backofficeApp.dailyReportingManager.controller',
    'backofficeApp.BDMarketingManager.controller',
    'backofficeApp.ProductManager.controller',
    'backofficeApp.CSOpsManager.controller',
    'backofficeApp.exportReportManager.controller',
    'backofficeApp.communityAmbassadorManager.controller',
    'backofficeApp.communityAmbassadordataManager.controller',

    /*  宝宝树66小区sprint6    add   绑定邀请人和被邀请人关系 guo.xiaomin  20171212  start   */
    'backofficeApp.userInvitation.controller',
    /*  宝宝树66小区sprint6    add   绑定邀请人和被邀请人关系 guo.xiaomin  20171212  end   */

    // commission
    'backofficeApp.orderTotalCommisionListManager.controller',
    'backofficeApp.ambCommissionDayManager.controller',

    /***宝宝树四期 复核日志  pzs 20171031  start*****/
    'backofficeApp.reexamineLogManager.controller',
    /***宝宝树四期 复核日志  pzs 20171031  start*****/

// opm 2.0
    'mis.home.controllers',
    'backofficeApp.menuManager.controllers',
    'backofficeApp.userManager.controllers',
    'mis.communityManager.controllers',
    'backofficeApp.questionStoreManager.controllers',
    'backofficeApp.roleManager.controllers',
    'mis.logManager.controllers',
    'mis.appUserManager.controllers',
    'mis.userAuth.controllers',
    'partials.commission.controllers',
    'mis.moderator.controllers',
    'mis.leifeng.controllers',
    'mis.lotteryManager.controllers',
    'mis.integralStrategyManager.controllers',
    'mis.bannerManager.controllers',
    'mis.cardManager.controllers',
    'mis.questionManager.controllers',
    'mis.marketManager.controllers',
    'mis.topicManager.controllers',

    'mis.activityManager.controllers',
    'mis.regionsManager.controllers',
    'mis.dataSyncManager.controllers',
    'mis.h5Manager.controllers',
    'mis.pushManager.controllers',
    'mis.userScoreManager.controllers',
    'mis.themeManager.controllers',
    'mis.scoreShopManager.controllers',
    'mis.apiManagerController.controllers',
    'mis.splashScreenManager.controllers',
    'mis.creatorManager.controllers',
    // weixin 服务号
    'mis.weixinManager.controllers',

]).

    config(['$routeProvider', function ($routeProvider) {

    //


        //default路由
        $routeProvider.
            when('/', {templateUrl: 'partials/login.html', controller: "loginCtrl", requireLogin: false});

        ////HomePage路由
        //$routeProvider.
        //    when('/index', {
        //        templateUrl: 'partials/index.html',
        //        controller: ''
        //    });

        //登录路由
        $routeProvider.
            when('/login', {templateUrl: 'partials/login.html', controller: "loginCtrl", requireLogin: false});

        //后台用户管理
        $routeProvider.
            when('/backendUser', {
                templateUrl: 'partials/system/backendUser/backendUser-List.html',
                controller: "backendUserCtrl",
                requireLogin: true
            });
        //when('/backendUser', checkAuthentication('partials/system/backendUser/backendUser-List.html', 'backendUserCtrl'));

        $routeProvider.
            when('/backendServiceUser', {
                templateUrl: 'partials/system/backendUser/backendServiceUser-List.html',
                controller: "backendServiceUserCtrl",
                requireLogin: true
            });

        //$routeProvider.
        //    when('/scoreShop', {
        //        templateUrl: 'partials/operation/scoreShop/scoreShopList.html',
        //        controller: 'scoreShopCtrl'
        //    });

        //$routeProvider.
        //    when('/exchangeRecord', {
        //        templateUrl: 'partials/operation/scoreShop/exchangeRecord.html',
        //        controller: 'exchangeRecordCtrl'
        //    });

        //$routeProvider.
        //    when('/addScore', {
        //        templateUrl: 'partials/operation/scoreShop/addScore.html',
        //        controller: 'addScoreCtrl'
        //    });
        //
        //$routeProvider.
        //    when('/addScoreLogList', {
        //        /*templateUrl: 'partials/system/frontendUser/frontendUser-List.html',*/
        //        templateUrl: 'partials/operation/scoreShop/addScoreLogList.html',
        //        controller: "addScoreLogCtrl",
        //        requireLogin: true
        //    });

        $routeProvider.
            when('/console', {
                templateUrl: 'partials/system/console.html',
                controller: 'backendConsoleCtrl'
            });

        $routeProvider.
            when('/download', {
                templateUrl: 'partials/system/download.html',
                controller: 'downloadCtrl'
            });

        $routeProvider.
            when('/pushRecord', {
                templateUrl: 'partials/system/pushRecord.html',
                controller: 'pushRecordCtrl'
            });

        //运营管理
        $routeProvider.
            when('/specialNews', {
                templateUrl: 'partials/operation/merchant/specialNewsList.html',
                controller: 'specialNewsCtrl'
            });
        $routeProvider.
            when('/specialNews/add', {
                templateUrl: 'partials/operation/merchant/specialNewsAdd.html',
                controller: 'specialNewsCtrl'
            });

        $routeProvider.
            when('/activity', {
                templateUrl: 'partials/operation/merchant/activityList.html',
                controller: 'activityCtrl'
            });

        $routeProvider.
            when('/push', {
                templateUrl: 'partials/operation/merchant/push.html',
                controller: 'pushCtrl'
            });

        $routeProvider.
            when('/pushmessage', {
                templateUrl: 'partials/operation/merchant/pushmessage.html',
                controller: 'pushmessageCtrl'
            });

        $routeProvider.
            when('/promotionCode', {
                templateUrl: 'partials/system/promotionCode.html',
                controller: 'promotionCodeCtrl'
            });
        //错误日志
        $routeProvider.
            when('/appErrorLog', {
                templateUrl: 'partials/system/appErrorLog.html',
                controller: 'appErrorLogCtrl'
            });

        //问答路由
        //$routeProvider.
        //    when('/questionManager', {
        //        templateUrl: 'partials/operation/question/questionList.html',
        //        controller: 'questionListCtrl'
        //    });

        $routeProvider.
            when('/recommendQuestion/:communityId/:category/:tagflg/:replieflg/:nickname/:description/:startDate/:endDate/:level/:userid', {
                templateUrl: 'partials/operation/question/recommendList.html',
                controller: 'recommendCtrl'
            });
        $routeProvider.
            when('/questionManager/add', {
                templateUrl: 'partials/operation/question/questionAdd.html',
                controller: 'questionAddCtrl'
            });
        $routeProvider.
            when('/questionManager/edit/:objId/:community/:category/:tagflg/:replieflg/:nickname/:description/:startDate/:endDate/:level/:userid', {
                templateUrl: 'partials/operation/question/questionEdit.html',
                controller: 'questionEditCtrl'
            });
        $routeProvider.
            when('/questionManager/reply/:objId/:token', {
                templateUrl: 'partials/operation/question/replyList.html',
                controller: 'replyListCtrl'
            });

        $routeProvider.
            when('/noReplyQuestion', {
                templateUrl: 'partials/operation/question/noReplyQuestion.html',
                controller: 'noReplyCtrl'
            });
        $routeProvider.
            when('/reportQuestion', {
                templateUrl: 'partials/operation/question/reportQuestion.html',
                controller: 'reportCtrl'
            });

        $routeProvider.
            when('/question/add', {
                templateUrl: 'partials/operation/question/questionAdd.html',
                controller: 'questionAddCtrl'
            });

        //短信路由
        $routeProvider.
            when('/shortMessageManager', {
                templateUrl: 'partials/operation/shortMessage/shortMessageList.html',
                controller: 'shortMessageListCtrl'
            });

        //环信IM聊天路由
        $routeProvider.
            when('/chatMessageManager', {//TODO:
                templateUrl: 'partials/operation/shortMessage/chatMessageList.html',//TODO,页面改回来
                controller: 'chatMessageListCtrl'
            });

        /* 个性化推荐效果分析 2015-4-14 */
        $routeProvider.
            when('/interest', {
                templateUrl: 'partials/operation/shortMessage/interest.html',//TODO,页面改回来
                controller: 'interestCtrl'
            });

        //客服管理
        $routeProvider.
            when('/customerManager', {
                templateUrl: 'partials/operation/customer/customerList.html',
                controller: 'customerListCtrl'
            });
        $routeProvider.
            when('/authentication', {
                templateUrl: 'partials/operation/customer/authenticationList.html',
                controller: 'customerListCtrl'
            });
        $routeProvider.
            when('/feedback', {
                templateUrl: 'partials/operation/customer/feedbackList.html',
                controller: 'feedbackCtrl'
            });

        $routeProvider.
            when('/supplement', {
                templateUrl: 'partials/operation/customer/supplementList.html',
                controller: 'supplementCtrl'
            });
        //$routeProvider.
        //    when('/community', {
        //        templateUrl: 'partials/operation/customer/communityList.html',
        //        controller: 'supplementCtrl'
        //    });
        $routeProvider.
            when('/community/edit/:objId', {
                templateUrl: 'partials/operation/customer/communityEdit.html',
                controller: 'communityEditCtrl'
            });

        $routeProvider.
            when('/community/add', {
                templateUrl: 'partials/operation/customer/communityAdd.html',
                controller: 'communityAddCtrl'
            });

        $routeProvider.
            when('/community/applications', {
                templateUrl: 'partials/operation/customer/communityApplications.html',
                controller: 'communityApplicationsCtrl'
            });

        $routeProvider.
            when('/notice', {
                templateUrl: 'partials/operation/customer/noticeList.html',
                controller: 'noticeCtrl'
            });
        $routeProvider.
            when('/addNotice', {
                templateUrl: 'partials/operation/customer/noticeAdd.html',
                controller: 'noticeAddCtrl'
            });

        $routeProvider.
            when('/notice/:noticeId', {
                templateUrl: 'partials/operation/customer/noticeAdd.html',
                controller: 'noticeEditCtrl'
            });

        ////专题
        //$routeProvider.
        //    when('/topic', {
        //        templateUrl: 'partials/operation/topic/topicList.html',
        //        controller: 'topicListCtrl'
        //    });
        //
        ////专题
        //$routeProvider.
        //    when('/topicAdd', {
        //        templateUrl: 'partials/operation/topic/topicAdd.html',
        //        controller: 'topicAddCtrl'
        //    });
        //
        //$routeProvider.
        //    when('/topicEdit/:objId', {
        //        templateUrl: 'partials/operation/topic/topicAdd.html',
        //        controller: 'topicEditCtrl'
        //    });
        //$routeProvider.
        //    when('/cardList/', {
        //        templateUrl: 'partials/operation/topic/cardList.html',
        //        controller: 'cardCtrl'
        //    });
        //$routeProvider.
        //    when('/cardAdd/', {
        //        templateUrl: 'partials/operation/topic/cardAdd.html',
        //        controller: 'cardCtrl'
        //    });
        $routeProvider.
        when('/BI/commissionSettlement', {
            templateUrl: 'partials/BI/commissionSettlement.html',
            controller: 'commissionSettlementCtrl'
        });
        $routeProvider.
            when('/cardEdit/:objId', {
                templateUrl: 'partials/operation/topic/cardEdit.html',
                controller: 'cardEditCtrl'
            });
        //互助
        $routeProvider.
            when('/mutualAid', {
                templateUrl: 'partials/operation/mutualAid/aidList.html',
                controller: 'mutualAidCtrl'
            });

        //邻里活动
        $routeProvider.
            when('/mutualAidNeighbourhoodActivity', {
                templateUrl: 'partials/operation/mutualAid/aidListNeighbourhoodActivity.html',
                controller: 'mutualAidNeighbourhoodActivityCtrl'
            });

        //代价券
        $routeProvider.
            when('/voucherType', {
                templateUrl: 'partials/voucher/voucherType.html',
                controller: 'voucherTypeCtrl'
            });

        $routeProvider.
            when('/voucher', {
                templateUrl: 'partials/voucher/voucherList.html',
                controller: 'voucherListCtrl'
            });

        $routeProvider.
            when('/retailer', {
                templateUrl: 'partials/voucher/retailer.html',
                controller: 'retailerCtrl'
            });

        $routeProvider.
            when('/retailer/:id', {
                templateUrl: 'partials/voucher/retailer_branch.html',
                controller: 'branchRetailerCtrl'
            });

        $routeProvider.
            when('/agreement/:id', {
                templateUrl: 'partials/voucher/retailer_agreement.html',
                controller: 'agreementCtrl'
            });

        $routeProvider.
            when('/retailerCommunity', {
                templateUrl: 'partials/voucher/retailer_community.html',
                controller: 'retailerCommunityCtrl'
            });

        $routeProvider.
            when('/retailerCommunity/:communityId', {
                templateUrl: 'partials/voucher/cooperation.html',
                controller: 'cooperationCtrl'
            });

        $routeProvider.
            when('/retailerExchange', {
                templateUrl: 'partials/voucher/retailer_exchange_list.html',
                controller: 'retailerExchangeCtrl'
            });

        $routeProvider.
            when('/communityRewardRule', {
                templateUrl: 'partials/voucher/communityRewardRule_list.html',
                controller: 'communityRewardRuleCtrl'
            });

        $routeProvider.
            when('/retailerBalance', {
                templateUrl: 'partials/voucher/retailer_balance_list.html',
                controller: 'retailerBalanceCtrl'
            });
        $routeProvider.
            when('/lotteryList', {
                templateUrl: 'partials/lottery/lottery_list.html',
                controller: 'lotteryActivityCtrl'
            });

        //banner管理
        $routeProvider.
            when('/bannerList/:type', {
                templateUrl: 'partials/banner/banner_list.html',
                controller: 'bannerListCtrl'
            });
        $routeProvider.
            when('/bannerAdd/:type', {
                templateUrl: 'partials/banner/banner_add.html',
                controller: 'bannerAddCtrl'
            });
        $routeProvider.
            when('/bannerEdit/:bannerId', {
                templateUrl: 'partials/banner/banner_edit.html',
                controller: 'bannerEditCtrl'
            });
        $routeProvider.
            when('/bannerOrder/:type/:communityId', {
                templateUrl: 'partials/banner/banner_order.html',
                controller: 'bannerOrderCtrl'
            });
        $routeProvider.
            when('/report', {
                templateUrl: 'partials/reports/report.html',
                controller: 'reportListCtrl'
            });
        $routeProvider.
            when('/reporting', {
                templateUrl: 'partials/reports/reporting.html',
                controller: 'reportingCtrl'
            });
        $routeProvider.
            when('/marketingReporting', {
                templateUrl: 'partials/reports/marketingReporting.html',
                controller: 'marketingReportingCtrl'
            });
        $routeProvider.
            when('/clickSourceReporting', {
                templateUrl: 'partials/reports/clickSourceReporting.html',
                controller: 'clickSourceReportingCtrl'
            });

        $routeProvider.
            when('/lotteryList', {
                templateUrl: 'partials/lottery/lottery_list.html',
                controller: 'lotteryActivityCtrl'
            });
        $routeProvider.
            when('/productList', {
                templateUrl: 'partials/lottery/product_list.html',
                controller: 'productCtrl'
            });
        $routeProvider.
            when('/addProduct', {
                templateUrl: 'partials/lottery/add_product.html',
                controller: 'addProductCtrl'
            });
        $routeProvider.
            when('/updateProduct/:id', {
                templateUrl: 'partials/lottery/update_product.html',
                controller: 'updateProductCtrl'
            });
        $routeProvider.
            when('/getCommunitysByLotteryId/:lotteryId', {
                templateUrl: 'partials/lottery/community_list.html',
                controller: 'getCommunitysCtrl'
            });
        $routeProvider.
            when('/getPrizeByLotteryId/:lotteryId', {
                templateUrl: 'partials/lottery/prize_list.html',
                controller: 'prizeListCtrl'
            });
        $routeProvider.
            when('/addPrize/:lotteryId', {
                templateUrl: 'partials/lottery/add_prize.html',
                controller: 'addPrizeCtrl'
            });
        $routeProvider.
            when('/updatePrize/:prizeId/:lotteryId', {
                templateUrl: 'partials/lottery/update_prize.html',
                controller: 'updatePrizeCtrl'
            });
        $routeProvider.
            when('/awardList/:lotteryId', {
                templateUrl: 'partials/lottery/award_list.html',
                controller: 'awardListCtrl'
            });
        $routeProvider.
            when('/addLottery', {
                templateUrl: 'partials/lottery/add_lottery.html',
                controller: 'addLotteryCtrl'
            });
        $routeProvider.
            when('/updateLottery/:lotteryId', {
                templateUrl: 'partials/lottery/update_lottery.html',
                controller: 'updateLotteryCtrl'
            });
        $routeProvider.
            when('/voucherStatistics', {
                templateUrl: 'partials/voucher/voucher_statistics.html',
                controller: 'voucherStatisticsCtrl'
            });
        $routeProvider.
            when('/voucherConsumeStatistics', {
                templateUrl: 'partials/voucher/voucher_consume.html',
                controller: 'voucherConsumeCtrl'
            });
        $routeProvider.
            when('/voucherIsSettlement', {
                templateUrl: 'partials/voucher/voucher_is_settlement.html',
                controller: 'voucherIsSettlementCtrl'
            });
        $routeProvider.
            when('/replyAtCsList', {
                templateUrl: 'partials/cs/reply_atcs_list.html',
                controller: 'replyAtCsCtrl'
            });
        //$routeProvider.
        //    when('/searchValue', {
        //        templateUrl: 'partials/operation/scoreShop/scoreShopSearchValue.html',
        //        controller: 'scoreShopSearchValueCtrl'
        //    });
        //$routeProvider.
        //    when('/scoreSummaryStats', {
        //        templateUrl: 'partials/operation/scoreShop/scoreShopSummaryStats.html',
        //        controller: 'scoreShopSummaryStatsCtrl'
        //    });
        $routeProvider.
            when('/community/group', {
                templateUrl: 'partials/community/community_group_list.html',
                controller: 'communityGroupCtrl'
            });
        $routeProvider.
            when('/community/addGroup', {
                templateUrl: 'partials/community/add_group.html',
                controller: 'addCommunityGroupCtrl'
            });
        $routeProvider.
            when('/community/updateGroup/:groupId', {
                templateUrl: 'partials/community/update_group.html',
                controller: 'updateCommunityGroupCtrl'
            });
        $routeProvider.
            when('/community/communityByGroup/:groupId', {
                templateUrl: 'partials/community/community_for_group.html',
                controller: 'updateCommunityGroupCtrl'
            });
        $routeProvider.
            when('/community/addCommunity4group/:groupId', {
                templateUrl: 'partials/community/add_community_for_group.html',
                controller: 'addCommunity4GroupCtrl'
            });
        $routeProvider.
            when('/600post', {
                templateUrl: 'partials/operation/question/600post.html',
                controller: 'postAddCtrl'
            });

        $routeProvider.
            when('/numbergroup', {
                templateUrl: 'partials/cs/numbergroup_list.html',
                controller: 'numberGroupCtrl'
            });

        $routeProvider.
            when('/questionStore', {
                templateUrl: 'mis/master/questionStore/questionStoreList.html',
                controller: 'questionStoreCtrl'
            });

        $routeProvider.
            when('/questionStore/Add', {
                templateUrl: 'partials/operation/question/questionStoreAdd.html',
                controller: 'questionStoreCtrl'
            });

        $routeProvider.
            when('/questionStore/Edit/:objId', {
                templateUrl: 'partials/operation/question/questionStoreEdit.html',
                controller: 'questionStoreEdit'
            });

        $routeProvider.
            when('/dosthList/config', {
                templateUrl: 'partials/operation/dosomething/dosthConfig.html',
                controller: 'dosth_config_Ctrl'
            });

        $routeProvider.
            when('/dosthList/1', {
                templateUrl: 'partials/operation/dosomething/dosth_1.html',
                controller: 'dosth_findCompatriotsCtrl'
            });

        $routeProvider.
            when('/dosthList/2', {
                templateUrl: 'partials/operation/dosomething/dosth_2.html',
                controller: 'dosth_findPlaymates_Ctrl'
            });

        $routeProvider.
            when('/dosthList/3', {
                templateUrl: 'partials/operation/dosomething/dosth_3.html',
                controller: 'dosth_dosthTogether_Ctrl'
            });

        $routeProvider.
            when('/geek/apply', {
                templateUrl: 'partials/operation/geekManager/geekApply.html',
                controller: 'geekApplyCtrl'
            });


// opm 2.0
        //API
        $routeProvider.when('/api',{
            templateUrl:'mis/system/api/apiList.html',
            controller: 'apiCtrl',
            requireLogin: true
        });

        $routeProvider.
            when('/index', {
                templateUrl: 'mis/system/home/home.html',
                controller: 'homeCtrl'
            });

        $routeProvider.
            when('/menuList', {
                templateUrl: 'mis/system/menu/menuList.html',
                controller: 'menuCtrl'
            });
        $routeProvider.
            when('/userList', {
                templateUrl: 'mis/system/user/userList.html',
                controller: 'userCtrl'
            });
        $routeProvider.
            when('/community', {
                templateUrl: 'mis/community/communityList.html',
                controller: 'communityCtrl'
            });
        $routeProvider.
            when('/communityImport', {
                templateUrl: 'mis/community/communityImportList.html',
                controller: 'communityImportCtrl'
            });

        $routeProvider.
            when('/communitySupplement', {
                templateUrl: 'mis/community/communitySupplementList.html',
                controller: 'communitySupplementCtrl'
            });

        $routeProvider.
            when('/communityApply', {
                templateUrl: 'mis/community/communityApplyList.html',
                controller: "communityApply",
                requireLogin: true
            });

        $routeProvider.
            when('/roleList', {
                templateUrl: 'mis/system/role/roleList.html',
                controller: 'roleCtrl'
            });

        $routeProvider.
            when('/log', {
                templateUrl: 'mis/system/log/logList.html',
                controller: 'logCtrl'
            });

        //前台用户管理
        $routeProvider.
            when('/appUserManager', {
                templateUrl: 'mis/appuser/userManager/userManagerList.html',
                controller: "appUserManagerCtrl",
                requireLogin: true
            });
        //抽奖活动管理
        $routeProvider.
            when('/lotteryList', {
                templateUrl: 'mis/operate/lottery/lotteryList.html',
                controller: "lotteryCtrl",
                requireLogin: true
            });
        //发帖
        $routeProvider.
            when('/postQuestion', {
                templateUrl: 'mis/operate/question/postQuestion.html',
                controller: "postQuestion",
                requireLogin: true
            });

        //V认证管理
        $routeProvider.
            when('/userAuth', {
                templateUrl: 'mis/appuser/userAuth/userAuthList.html',
                controller: "userAuthCtrl",
                requireLogin: true
            });
        /*  宝宝树66小区sprint4    add   大使佣金订单详情 luolh  20171027  start   */
        //佣金管理
        $routeProvider.
        when('/commissionOrderDetail', {
            templateUrl: 'partials/commission/commissionOrderDetailList.html',
            controller: "commissionOrderDetailCtrl",
            requireLogin: true
        });
        /*  宝宝树66小区sprint4    add   大使佣金订单详情 luolh  20171027  start   */
        //版主申请
        $routeProvider.
            when('/moderator', {
                templateUrl: 'mis/appuser/roleApply/moderatorApply.html',
                controller: "moderatorApplyCtrl",
                requireLogin: true
            });
        //创始人申请
        $routeProvider.
            when('/creator', {
                templateUrl: 'mis/appuser/roleApply/creatorApply.html',
                controller: "creatorApplyCtrl",
                requireLogin: true
            });
        //雷锋团申请
        $routeProvider.
            when('/leifeng', {
                templateUrl: 'mis/appuser/roleApply/leifengApply.html',
                controller: "leifengApplyCtrl",
                requireLogin: true
            });
        //版主审核
        $routeProvider.
            when('/moderatorExam', {
                templateUrl: 'mis/appuser/roleExamine/moderatorExamine.html',
                controller: "moderatorExamCtrl",
                requireLogin: true
            });
        //雷锋团审核
        $routeProvider.
            when('/leifengExam', {
                templateUrl: 'mis/appuser/roleExamine/leifengExamine.html',
                controller: "leifengExamCtrl",
                requireLogin: true
            });


        //积分策略
        $routeProvider.
            when('/integralStrategy', {
                templateUrl: 'mis/master/integralStrategy/integralStrategyList.html',
                controller: "integralStrategyCtrl",
                requireLogin: true
            });
        //某活动奖品
        $routeProvider.
            when('/lotteryPrizeList/:lotteryId', {
                templateUrl: 'mis/operate/lottery/lotteryPrizeList.html',
                controller: "lotteryPrizeCtrl",
                requireLogin: true
            });
        //Banner
        $routeProvider.
            when('/bannerList', {
                templateUrl: 'mis/operate/banner/bannerList.html',
                controller: "bannerCtrl",
                requireLogin: true
            });

        //card
        $routeProvider.
            when('/cardList', {
                templateUrl: 'mis/operate/card/cardList.html',
                controller: "cardCtrl",
                requireLogin: true
            });


        //帖子列表
        $routeProvider.
            when('/questionList/:model', {
                templateUrl: 'mis/question/questionList.html',
                controller: "questionCtrl",
                requireLogin: true
            });
        //帖子推送
        $routeProvider.
            when('/questionPush', {
                templateUrl: 'mis/question/questionPush.html',
                controller: "questionPushCtrl",
                requireLogin: true
            });
        $routeProvider.
            when('/questionPost', {
                templateUrl: 'mis/question/questionPost.html',
                controller: "questionPostCtrl",
                requireLogin: true
            });
        // @列表
        $routeProvider.
            when('/replyAtList/:model', {
                templateUrl: 'mis/question/replyAtList.html',
                controller: "replyAtCtrl",
                requireLogin: true
            });
       <!--  宝宝树66小区二次改造    add   gct  20170822   start   -->
        // 私信小6列表
        $routeProvider.
        when('/personalLetterAtList', {
            templateUrl: 'mis/question/personalLetterAtList.html',
            controller: "personalLetterCtrl",
            requireLogin: true
        });
        <!--  宝宝树66小区二次改造    add   gct  20170822   end   -->
        $routeProvider.
            when('/questionReplyList', {
                templateUrl: 'mis/question/questionReplyList.html',
                controller: "questionReplyCtrl",
                requireLogin: true
            });
        //话题
        $routeProvider.
            when('/themeList', {
                templateUrl: 'mis/operate/theme/themeList.html',
                controller: "themeCtrl",
                requireLogin: true
            });

        //活动
        $routeProvider.
            when('/activityList', {
                templateUrl: 'mis/operate/activity/activityList.html',
                controller: "activityCtrl",
                requireLogin: true
            });

        $routeProvider.
            when('/changePassword', {
                templateUrl: 'mis/system/user/changePassword.html',
                controller: "changePasswordCtrl",
                requireLogin: true
            });
        //集市二手
        $routeProvider.
            when('/secondHandList', {
                templateUrl: 'mis/market/secondHand/secondHandList.html',
                controller: "secondHandCtrl",
                requireLogin: true
            });
        $routeProvider.
            when('/secondHandReplyList', {
                templateUrl: 'mis/market/secondHand/secondHandReplyList.html',
                controller: "secondHandReplyList",
                requireLogin: true
            });

        // 专题
        $routeProvider.
            when('/topicList', {
                templateUrl: 'mis/operate/topic/topicList.html',
                controller: "topicManagerCtrl",
                requireLogin: true
            });

        // 行政区域
        $routeProvider.
            when('/regionsList', {
                templateUrl: 'mis/master/regions/regionsList.html',
                controller: "regionsCtrl",
                requireLogin: true
            });

        $routeProvider.
            when('/dataSync', {
                templateUrl: 'mis/master/dataSync/dataSync.html',
                controller: "dataSyncCtrl",
                requireLogin: true
            });

        $routeProvider.
            when('/questionReportList', {
                templateUrl: 'mis/question/questionReportList.html',
                controller: "questionReportCtrl",
                requireLogin: true
            });

        $routeProvider.
            when('/h5List', {
                templateUrl: 'mis/operate/h5/h5List.html',
                controller: "h5Ctrl",
                requireLogin: true
            });
        //push信息
        $routeProvider.
            when('/pushMessage', {
                templateUrl: 'mis/operate/push/pushMessage.html',
                controller: "pushCtrl",
                requireLogin: true
            });
        //push统计分析
        $routeProvider.
            when('/pushMessageAnalysis', {
                templateUrl: 'mis/operate/push/pushMessageAnalysis.html',
                controller: "pushAnalysis",
                requireLogin: true
            });
        //用户情值
        $routeProvider.
            when('/userScoreList', {
                templateUrl: 'mis/appuser/userManager/userScoreList.html',
                controller: "userScoreCtrl",
                requireLogin: true
            });
        //用户情值明细
        $routeProvider.
            when('/userScoreDetail/:objId/:name', {
                templateUrl: 'mis/appuser/userManager/userScoreDetail.html',
                controller: "userScoreDetailCtrl",
                requireLogin: true
            });
        //积分商城
        $routeProvider.
            when('/scoreShopList', {
                templateUrl: 'mis/master/scoreShop/scoreShopList.html',
                controller: "scoreShopCtrl",
                requireLogin: true
            });

        //闪屏
        $routeProvider.
            when('/splashScreenList', {
                templateUrl: 'mis/master/splashScreen/splashScreenList.html',
                controller: "splashScreenCtrl",
                requireLogin: true
            });


        // BI
        $routeProvider.
        when('/BI/dailyReporting', {
            templateUrl: 'partials/BI/dailyReporting.html',
            controller: 'dailyReportingCtrl'
        });
        $routeProvider.
            when('/BI/inviteList', {
                templateUrl: 'partials/BI/BDMarketing/inviteList.html',
                controller: 'inviteListCtrl'
            });
        $routeProvider.
            when('/BI/promoCodeStats', {
                templateUrl: 'partials/BI/BDMarketing/promoCodeStats.html',
                controller: 'promoCodeStatsCtrl'
            });
        $routeProvider.
            when('/BI/clickSource', {
                templateUrl: 'partials/BI/Product/clickSource.html',
                controller: 'clickSourceCtrl'
            });
        $routeProvider.
            when('/BI/commApps', {
                templateUrl: 'partials/BI/BDMarketing/commApps.html',
                controller: 'commAppsCtrl'
            });
        $routeProvider.
            when('/BI/topList', {
                templateUrl: 'partials/BI/CSOps/topList.html',
                controller: 'topListCtrl'
            });
        $routeProvider.
        when('/BI/communityAmbassador', {
            templateUrl: 'partials/BI/communityAmbassador.html',
            controller: 'communityAmbassadorCtrl'
        });
        $routeProvider.
        when('/BI/communityAmbassadordata', {
            templateUrl: 'partials/BI/communityAmbassadordata.html',
            controller: 'communityAmbassadordataCtrl'
        });
        /******* 宝宝树66小区二次改造 小区大使信息导出 wangcan 20170918 start *******/
        $routeProvider.
            when('/BI/exportReport', {
                templateUrl: 'partials/BI/exportReport.html',
                controller: 'exportReportCtrl'
            });
        /******* 宝宝树66小区二次改造 小区大使信息导出 wangcan 20170918 end *******/

        /*****宝宝树66小区四期   复核日志   pzs 20171031  start***/
        $routeProvider.
        when('/commission/reexamineLog', {
            templateUrl: 'partials/commission/reexamineLog.html',
            controller: 'reexamineLogCtrl'
        });
        /*****宝宝树66小区四期   复核日志   pzs 20171031  end***/

        // 心愿管理
        $routeProvider.
            when('/weixin/wish', {
                templateUrl: 'mis/weixin/wish.html',
                controller: 'wishCtrl'
            });
        $routeProvider.
            when('/weixin/userwish', {
                templateUrl: 'mis/weixin/userwish.html',
                controller: 'userWishCtrl'
            });

        /*  宝宝树66小区sprint4    add   66后台订单总佣金 wangcan  20171026  start   */
        $routeProvider.
        when('/commission/orderTotalCommisionList', {
            templateUrl: 'partials/commission/orderTotalCommisionList.html',
            controller: 'orderTotalCommisionListCtrl'
        });
        /*  宝宝树66小区sprint4    add   66后台订单总佣金 wangcan  20171026  end   */

        /*  宝宝树66小区sprint4    add   66后台某天大使佣金 wangcan  20171031  start   */
        $routeProvider.
        when('/commission/ambCommissionForDay', {
            templateUrl: 'partials/commission/ambCommissionForDay.html',
            controller: 'ambCommissionDayCtrl'
        });
        /*  宝宝树66小区sprint4    add   66后台某天大使佣金 wangcan  20171031  end   */


        /*  宝宝树66小区sprint6    add   绑定邀请人和被邀请人关系 guo.xiaomin  20171212  start   */
        $routeProvider.
        when('/BI/userInvitation', {
            templateUrl: 'partials/BI/userInvitation.html',
            controller: 'userInvitationCtrl'
        });
        /*  宝宝树66小区sprint6    add   绑定邀请人和被邀请人关系 guo.xiaomin  20171212  end   */

    }]
)
    .run(function ($rootScope, $location) {
        $rootScope.$on("$routeChangeStart", function (event, next, current) {
            if (sessionStorage.getItem("isAuthenticated") != "true") {
                $location.path("/login");
            }
        });
    });